home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / vol11n07.zip / SWTEST.PAS < prev   
Pascal/Delphi Source File  |  1992-01-05  |  773b  |  27 lines

  1. PROGRAM SWriTest;
  2. USES SWrite, WinProcs, WinTypes;
  3. CONST S : PChar = 'Sin(Pi/2)=';
  4. VAR
  5.   TmpOut : Text;
  6.   R      : Real;
  7.   x      : ARRAY[0..64] OF Char;
  8.   C      : Char;
  9. BEGIN
  10.   AssignWrite(Output, 64, FALSE); {a buffer size of 64 is set here}
  11.   ReWrite(Output);
  12.   Write('Hello World! ');
  13.   MessageBox(0, GetLastWritten, 'start test', mb_Ok);
  14.   R := Pi/2;
  15.   WriteLn('Pi is ', Pi:3:4, S:12, Sin(R):2:2);
  16.   MessageBox(0, GetLastWritten, 'swrite test', mb_Ok);
  17.   Close(Output);
  18.   AssignWrite(Output, 512, TRUE); {Accumulate Writes}
  19.   ReWrite(Output);
  20.   FillChar(X,SizeOf(X),'x');
  21.   X[64] := #0;
  22.   FOR C := '1' to '6' DO
  23.     WriteLn(C,X);
  24.   WriteLn('Accumulated seven lines');
  25.   MessageBox(0, GetLastWrittenC(Output), 'Accumulate Test', mb_Ok);
  26. END.
  27.